
<!-- ######### PREVIEW EVENT DIALOG ##########-->
<div dojoType="dijit.Dialog" style="width: 350px;" id="previewDialog"
	title="Please Verify Event Information" execute="" refreshOnShow="true">
<table border="1" width="100%">
	<tr>
		<td id="d_title" style='color:#ffffff; font-weight: 600; font-size:13px;padding-left:10px; background-color: #436792;'></td>
	</tr>
	<tr>
		<td id="d_descr"></td>
	</tr>
	<tr>
		<td id="d_date"></td>
	</tr>
	<!--<tr>
		<td id="d_endDate"></td>
	</tr>-->
	<tr>
		<td id="d_loc"></td>
	</tr>
	<tr>
		<td id="d_name"></td>
	</tr>
	<tr>
		<td id="d_phone"></td>
	</tr>
	<tr>
		<td id="d_email"></td>
	</tr>
	<tr>
		<td id="d_url"></td>
	</tr>
	<tr>
		<td align="center" style="padding-top: 10px;">
		<button dojoType=dijit.form.Button type="button"
			onClick="dijit.byId('previewDialog').hide();">Back</button>
		 &nbsp; &nbsp;
		<button dojoType=dijit.form.Button type="button"
			onClick="submitEvent();">Submit Event</button>
		</td>
	</tr>
</table>
</div>

<!-- ######### DELETE EVENT DIALOG ##########-->
<div dojoType="dijit.Dialog" style="width: 350px;" id="eventDeleteDialog"
	title="Are you sure you want to delete this event?" execute="" refreshOnShow="true">
<table border="1"  width="100%">
	<tr>
		<td id="de_title" style='color:#ffffff; font-weight: 600; font-size:13px;padding-left:10px; background-color: #436792;'></td>
	</tr>
	<tr>
		<td align="center" style="padding-top: 10px;">
		<button dojoType=dijit.form.Button type="button"
			onClick="executeEventDelete();">Yes</button>&nbsp; &nbsp;
		<button dojoType=dijit.form.Button type="button"
			onClick="dijit.byId('eventDeleteDialog').hide();">No</button>
		</td>
	</tr>
</table>
</div>


<!-- ######### EDIT EVENT DIALOG ##########-->
<div dojoType="dijit.Dialog" style="width: 475px;" id="eventEditDialog" title="Edit Event Details" execute="" refreshOnShow="true">
  <table>
	<tr>
		<td style='font-size: 10px; color: #FF0000; vertical-align: bottom;'>* Indicates required fields</td>
	</tr>
</table>

<div id="edit" dojoType="dijit.form.Form" action="" method="">

<table style="border:1px #000000 solid;" cellspacing="0" cellpadding="0">
	<tr>
		<th colspan="3" id='e_header'>Edit Event</th>
	</tr>
	<!-- START DATE ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Start Date:<span
			style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2">
			<input style="width:300px;" type="text" id="e_date1" name="e_date1" value="" dojoType="dijit.form.DateTextBox" required="true" selector="date" />
		</td>
	</tr>
	<!-- START TIME ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Start Time:<span
			style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_time1"
			name="e_time1" value="" dojoType="dijit.form.TimeTextBox"
			required="true" selector="time" /></td>
	</tr>

	<!-- END DATE ####################################################### -->
	<!--<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">End Date:</td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_date2"
			name="e_date2" value="" dojoType="dijit.form.DateTextBox" required="false" selector="date" />
		</td>
	</tr>-->
	<!-- END TIME ####################################################### -->
	<!--<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">End Time:</td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_time2"
			name="e_time2" value="" dojoType="dijit.form.TimeTextBox" required="false" selector="time" /></td>
	</tr>-->


	<!-- CATEGORY ####################################################### -->
	<?PHP
	$result = $xoopsDB->query( "SELECT * FROM ".$xoopsDB->prefix("calendar_evnt_category")." WHERE ID <> 1 ORDER BY NAME asc" ) ;
	$rows = $xoopsDB->getAffectedRows($result);
	if ( $result && $rows > 0) { ?>
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Category:</td>
		<td class="even" colspan="2"><select style="width:300px;"
			dojoType="dijit.form.FilteringSelect" name="e_eventCatAdd"
			id="e_eventCatAdd" autocomplete="false" value="1">
			<option value="1" selected="selected">Select Category:</option><!-- 1 is the Default category which should have an ID = 1 in calendar_events.ID -->
			<?PHP
			while ( $myrow = $xoopsDB->fetchArray($result) ) {
			echo "<option value=\"".$myrow['ID']."\">".$myrow['NAME']."</option>\n";
			}
			?>
		</select></td>
	</tr>
	<?PHP } ?>

	<!-- EVENT TITLE ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Title:<span
			style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" name="e_title" id="e_title" value="" dojoType="dijit.form.TextBox" required="true" trim="true" propercase="true" /></td>
	</tr>
	<!-- DESCRIPTION ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Description:<br /><span style="font-size:10px;">(up to 300 words)</span></td>
		<td class="even" colspan="2" id="textAreaHolder">
		<div dojoType="dijit.form.Textarea" id="e_description"
			name="e_description" style="width: 300px;"></div>
		</td>
	</tr>
	<!-- LOCATION ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Location:<span
			style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" name="e_location" id="e_location"
			value="" dojoType="dijit.form.TextBox"  required="true" trim="true" propercase="true" /></td>
	</tr>
	<!-- CONTACT NAME ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Contact
		Name:<span style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_contact_name" name="e_contact_name"
			value="" dojoType="dijit.form.TextBox"  required="true" trim="true" propercase="true" />
		</td>
	</tr>
	<!-- CONTACT PHONE ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Contact
		Phone:<span	style='font-size: 10px; color: #FF0000'>*</span></td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_contact_phone" name="e_contact_phone"
			value="" dojoType="dijit.form.TextBox"  required="true" trim="true" />
		</td>
	</tr>
	<!-- CONTACT EMAIL ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Contact
		Email:</td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_contact_email" name="e_contact_email"
			value="" dojoType="dijit.form.TextBox" trim="true" propercase="false" />
		</td>
	</tr>
	<!-- EVENT WEBSITE ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">Event
		Website:</td>
		<td class="even" colspan="2"><input style="width:300px;" type="text" id="e_website" name="e_website"
			value="http://" dojoType="dijit.form.TextBox" trim="true"
			propercase="false" /></td>
	</tr>

	<!-- SUBMIT BUTTONS ####################################################### -->
	<tr>
		<td class="head" style="<?PHP echo $submitFormHdrs; ?>">
		</td>
		<td class="even">
			<button dojoType="dijit.form.Button" type="submit" onClick="validateEvntEdit();" style="height: 50px;padding-bottom:0;margin-bottom:0">Submit Changes</button>
			<button dojoType="dijit.form.Button" onClick="dijit.byId('eventEditDialog').hide();" style="height: 50px;padding-bottom:0;margin-bottom:0">Cancel</button>
			<?PHP
			if(isset($_SESSION['XOOPS_ISADMIN']) && $_SESSION['XOOPS_ISADMIN'] != 1){
				echo "<div style='padding:0;margin-top:-10px; font-size: 10px; color: #FF0000; vertical-align: bottom;'>NOTE: Event Announcements must be approved by our staff. ";
				echo "Event submissions will also be sent to the following media outlets on approval: ";
				//INDICATE THEIR EVENT WILL BE SENT TO THE FOLLOWING MEDIA ENTITIES AS WELL:
				$result = $xoopsDB->query("select MediaName from ".$xoopsDB->prefix("calendar_mednot")." WHERE MediaName <> 'Default' ORDER BY MediaName ASC") ;
				if ( $result ) {
					while($myrow = $xoopsDB->fetchArray($result)){
						echo $myrow['MediaName'].";   ";
					}
				}

				echo "</div>";

			}//end if admin
			?>
		</td>
	</tr>

</table>
</div>

</div>
